package com.timous.service;

import com.timous.Entity.Blog;
import com.timous.vo.BlogQuery;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

public interface BlogService {

    Blog getBlog(Long id);

    Blog getAndConvert(Long id);

    Page<Blog> listBlog(Pageable pageable, BlogQuery blogQuery);

    Blog saveBlog(Blog blog);

    Blog updateBlog(Long id, Blog blog);

    void deleteBlog(Long id);

    //前台展示所用的方法
    Page<Blog> listBlog(Pageable pageable);


    Page<Blog> listBlog(Long tagId , Pageable pageable);

    //推荐的博客的列表
    List<Blog> listRecommendBlogTop(Integer size);

    Page<Blog> listBlog(String query, Pageable pageable);


    //归档的页面
    Map<String , List<Blog>> achiveBlog();

    Long countBlog();

}
